-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow references to casks when running upgrade and outdated #7927
Conversation
@homebrew/cask @vitorgalvao any objections/thoughts on this? |
@miccal It would accept arguments for both and only pass on those relevant to the given command. |
The relevant flags passed to I guess Mike and I were writing the same comment at the same time, oops :/ |
Thank you for the explanation @whoiswillma and @MikeMcQuaid -- I think it would make sense to unify the |
None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tweak otherwise looking great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there! Nice work 👏
@whoiswillma can you enable edits for maintainers? This pull request needs to be rebased; I've done it locally but it needs to be on GitHub before this can be merged. Thanks! |
Seems like GitHub is being a bit finicky with push access on PRs since I'm not the one that made the fork. I think you have direct write access to the fork now. Is that enough? |
For consistency with brew --cache
Thanks, looks like that worked. |
I think for the |
Maybe also deprecate |
I'll work on those changes |
For reference, here is an example output of json for outdated formula:
and outdated casks:
Given that the schema is slightly different between formulae and casks, I think the json v2 for formulae and casks should be completely separate. Maybe something like:
But I can see the argument for having them be merged: thoughts? |
Commit history is a bit messed up. I'll work on fixing it tomorrow Update: Commit history is fixed now. |
Co-authored-by: Eric Knibbe <enk3@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there 🎉
Thanks again @whoiswillma! |
@whoiswillma and @MikeMcQuaid I have created an issue here that I believe is a consequence of the changes made in this PR. Thank you. |
brew style
with your changes locally?brew tests
with your changes locally?Tests were not written because I think the same conditions hold for this PR as for this other PR
brew upgrade
upgrades both formulae and casks.brew outdated
was tricky to integrate because of the--json
option. It makes sense forbrew outdated
with no arguments to print all outdated formulae and casks, which impliesbrew outdated --json
should print the json for formulae and casks. However, I did not want to change the behavior ofbrew outdated --json
lest any scripts that depend on it break. I settled on the following compromise:brew outdated --json
prints json information for only formulae, which makes it equivalent tobrew outdated --json --formula-only
brew outdated --json --cask-only
prints json information for only casks.Another possibility is a v2 json API for
brew outdated
, but I haven't seen any demand for such featureA small script to install an outdated version of atom and youtube-dl (cask and formula respectively). Useful for testing